package chances.epg.navigator.context;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.PageContext;

import chances.epg.navigator.EpgConstants;


public class AccessContextUtils {
	/**
	 * 
	 * @param request
	 * @return
	 */
	public static AccessContext getAccessContext(HttpServletRequest request) {
		AccessContext context = (AccessContext)request.getAttribute(EpgConstants.EPG_CONTEXT);
		return context;
	}
	
	/**
	 * 
	 * @param request
	 * @return
	 */
	public static AccessContext getAccessContext(PageContext pageContext) {
		AccessContext context = (AccessContext)pageContext.getRequest().getAttribute(EpgConstants.EPG_CONTEXT);
		return context;
	}
}
